//options
clear all
set maxvar  32000, permanently
set matsize 11000, permanently
set more off, permanently
global bootstraps 1000
set seed 23

// macros
global klmshare				: env klmshare
global projects				: env projects
global klmperry             : env klmperry
global storage              : env storage
global storageb				: env storageb

global perrydatas       = "${klmperry}/CBA/data/perry/raw"
global perrydata        = "${klmperry}/CBA/data/perry/clean"
global masterinter  	= "${klmshare}/CurrentRAs/FredB/test"
global output           = "${projects}/ece_parenting/tex_files/other"
global dataperry        = "$klmperry/PerryPreschool/Data/Perry_PARI_and_Other_Data/PARI/DATA_PARI/"
global abcjpeanalysis   = "${klmshare}/Data_Central/Abecedarian/data/ABC-CARE/extensions/cba-iv/"
global dataihdp         = "${projects}/ece_parenting/data"
global dataihdp         = "$storageb/dc_data/"

cd  $dataihdp
use ihdp_data, clear
rename _all, lower

replace   bw = bw/1000


// impute iq
replace   stndscor =  iqcage     if stndscor ==.
replace   iqcage   =  stndscor   if iqcage ==.
foreach var of varlist stndscor iqcage { 
	replace `var' = mdi_24cor    if stndscor ==. & iqcage ==.
}
replace   stndscor =  iqcage     if stndscor ==.
replace   iqcage   =  stndscor   if iqcage ==.

// low birthweight
gen lb = 1
rename tot_siblings_natural siblings_natural

// list relevant variables
global baseline_child      twin sex bw lb anga black hispanic 
global baseline_mother     mage meduc works married 
global baseline_household  welfare siblings_natural employed_adult
global baseline_economy    employment medinc gpc
global outputs             iqcage stndscor 
global inputs              cum_avg_daycare_36m_sum

// mark baseline sample
reg  $baseline_child $baseline_mother $baseline_household $baseline_economy $outputs $inputs
gen  sample1 = e(sample) 
keep if sample1 == 1

// parenting latents, ages 1 and 3
foreach var of varlist alt_subscale_1_12-alt_subscale_6_12 alt_subscale_1_36-alt_subscale_8_36 {
	summ `var'
	gen  `var'_std = (`var' - r(mean))/r(sd)
}
# delimit
sem (_cons@0 X -> alt_subscale_1_12_std) (_cons@0 X -> alt_subscale_2_12_std) (_cons@0 X -> alt_subscale_3_12_std) 
	(_cons@0 X -> alt_subscale_4_12_std) (_cons@0 X -> alt_subscale_5_12_std) (_cons@0 X -> alt_subscale_6_12_std), method(adf);
predict parenting_age1, latent;
sem (_cons@0 X -> alt_subscale_1_36_std) (_cons@0 X -> alt_subscale_2_36_std) (_cons@0 X -> alt_subscale_3_36_std) (_cons@0 X -> alt_subscale_4_36_std)
	(_cons@0 X -> alt_subscale_5_36_std) (_cons@0 X -> alt_subscale_6_36_std) (_cons@0 X -> alt_subscale_7_36_std) (_cons@0 X -> alt_subscale_8_36_std), 
																																						 cov(e.alt_subscale_1_36_std*e.alt_subscale_2_36_std)
																																						 cov(e.alt_subscale_3_36_std*e.alt_subscale_4_36_std)
																																						 cov(e.alt_subscale_5_36_std*e.alt_subscale_6_36_std)
																																						 cov(e.alt_subscale_7_36_std*e.alt_subscale_8_36_std)
																																						 cov(e.alt_subscale_4_36_std*e.alt_subscale_7_36_std)
																																						 cov(e.alt_subscale_2_36_std*e.alt_subscale_7_36_std) method(adf);		
 predict parenting_age3, latent;
# delimit cr
egen    parenting_ages13 = rowmean(parenting_age1 parenting_age3)

// standardize latents in sample
foreach var of varlist parenting_ages13 {
	summ    `var' if tg == 0
	gen     `var'_std = (`var' - r(mean))/r(sd)
	replace `var'_std = `var'_std + 100
}
// log and standardize childcare variable 
summ    cum_avg_daycare_36m_sum  if tg == 0 
replace cum_avg_daycare_36m_sum  = (cum_avg_daycare_36m_sum    - r(mean))/r(sd)
replace cum_avg_daycare_36m_sum  =  cum_avg_daycare_36m_sum    + r(mean)

rename cum_avg_daycare_36m_sum c
rename parenting_ages13_std    p

global inputs_std c p
keep   ihdp site tg bwg $baseline_child $baseline_mother $baseline_household $baseline_economy $inputs_std $outputs
rename ihdp IHDP 
keep   IHDP
tempfile masample
save   "`masample'", replace

// construct data
global data_controls = "$storage/ece_parenting/data/controls/replic_controls.dta"
use    $data_controls

sort IHDP
// F28, 18-Month Family Interview
merge 1:1 IHDP using "$storage/ece_parenting/ICPSR_09795_ASCII/DS0051/F28_dsc_0051.dta", keepusing(V19_18m V21_18m) generate(_fam18)
// F47, 30-Month Family Interview
merge 1:1 IHDP using "$storage/ece_parenting/ICPSR_09795_ASCII/DS0081/F47_dsc_0081.dta", generate(_mergeF47)

merge 1:1 IHDP using "$storage/ece_parenting/data/daycare/daycare_inputs.dta", generate(_mergeDaycare)
// F57, 36-Month Stanford-Binet IQ Scale, DS0145 pdf p. 177
merge 1:1 IHDP using "$storage/ece_parenting/ICPSR_09795_ASCII/DS0099/F57_dsc_0099.dta", generate(_mergeF57)

// add parenting
merge 1:1 IHDP using "$storage/ece_parenting/data/HOME/HOME_12m.dta", generate(_mergeHOME12)
merge 1:1 IHDP using "$storage/ece_parenting/data/HOME/HOME_36m.dta", generate(_mergeHOME36)
drop subscale_1_12 subscale_2_12 subscale_3_12 subscale_4_12 subscale_5_12 subscale_6_12 alt_subscale_1_12 alt_subscale_2_12 alt_subscale_3_12 alt_subscale_4_12 alt_subscale_5_12 alt_subscale_6_12 parenting_12 std_parenting_12 subscale_1_36 subscale_2_36 subscale_3_36 subscale_4_36 subscale_5_36 subscale_6_36 subscale_7_36 subscale_8_36 alt_subscale_1_36 alt_subscale_2_36 alt_subscale_3_36 alt_subscale_4_36 alt_subscale_5_36 alt_subscale_6_36 alt_subscale_7_36 alt_subscale_8_36 parenting_36 std_parenting_36 

// generate average of parenting
egen avg_parenting = rowmean(parenting_12_alt parenting_36_alt)
// generate final parenting measure!
egen std_avg_parenting = std(avg_parenting)

merge 1:1 IHDP using "$storage/ece_parenting/data/employment/emp_status.dta", generate(_mergeEmployment)
//employment data
replace curr_emp_hours_week_18m = 0 if curr_employed_18m == 0
replace curr_emp_hours_week_24m = 0 if curr_employed_24m == 0
replace curr_emp_hours_week_30m = 0 if curr_employed_30m == 0
replace curr_emp_hours_week_36m = 0 if curr_employed_36m == 0
egen avg_mean_hw = rowmean(curr_emp_hours_week_18m curr_emp_hours_week_24m curr_emp_hours_week_30m curr_emp_hours_week_36m) 
rename (avg_mean_hw) (mother_laborhours)

//residualize parenting measure
reg std_avg_parenting mother_laborhours, rob
predict parenting_residualized, residual

// keep only 985 primary analysis children
keep if PAG == 1

// chaparro, sojourner, and wiswall sample
gen wiswall_sample = .
replace wiswall_sample = 1 if PPVTm != . & bayley12_mdi != . & ppvt3 != . & TWIN == 0
replace wiswall_sample = 0 if wiswall_sample == .
// recode cousins
replace TWIN = 0 if IHDP == 5143 | IHDP == 5254 | IHDP == 5163 | IHDP == 5429

// their childcare measure
gen avg_hours_day = CHOUR_T / 2
*gen daycare_hours_wiswall = (avg_hours_day * (CDAYS_T / 2)) / 52
gen daycare_hours_wiswall = (CDAYS_Y2 * CHOUR_Y2 + CDAYS_Y3 * CHOUR_Y3) / 52 / 2
replace daycare_hours_wiswall = 0 if daycare_hours_wiswall == .

// mother hours 18m
gen mother_18m = (V19_18m * 5 +  V21_18m * 2)
replace mother_18m = 0 if mother_18m == .
// mother hours 30m
gen mother_weekday_30m = V17_30m * 5 if V16_30m == 1
gen mother_weekend_30m = V24 * 2 if V23 == 1
egen mother_30m = rowtotal(mother_weekday_30m mother_weekend_30m)
// total mother hours
egen mother_carehours = rowmean(mother_18m mother_30m)
// total care hours
gen total_hours_wiswall_1 = (24 - 11.5) * 7
// other hours
gen other_hours_wiswall_1 = total_hours_wiswall_1 - daycare_hours_wiswall - mother_carehours

gen total_hours_wiswall_2 = (24 - 12) * 7
// other hours
gen other_hours_wiswall_2 = total_hours_wiswall_2 - daycare_hours_wiswall - mother_carehours

gen total_hours_wiswall_3 = (24 - 12.5) * 7
// other hours
gen other_hours_wiswall_3 = total_hours_wiswall_3 - daycare_hours_wiswall - mother_carehours

gen total_hours_wiswall_4 = (24 - 13) * 7
// other hours
gen other_hours_wiswall_4 = total_hours_wiswall_4 - daycare_hours_wiswall - mother_carehours

// daycare
// make daycare hours cummulative
// average center-based daycare
gen avg_daycare_18m 	= hours_daycare_18m
egen avg_daycare_24m 	= rowmean(hours_daycare_24m)
egen avg_daycare_30m 	= rowmean(hours_daycare_30m)
egen avg_daycare_36m 	= rowmean(hours_daycare_36m)

// Average daycare (secondary)
gen avg_daycare_18m_secondary 	= hours_daycare_18m_secondary 
egen avg_daycare_24m_secondary 	= rowmean(hours_daycare_24m_secondary)
egen avg_daycare_30m_secondary 	= rowmean(hours_daycare_30m_secondary)
egen avg_daycare_36m_secondary 	= rowmean(hours_daycare_36m_secondary)

// Average of averages daycare 
egen avg_daycare_18m_sum = rowtotal(avg_daycare_18m avg_daycare_18m_secondary)
egen avg_daycare_24m_sum = rowtotal(avg_daycare_24m avg_daycare_24m_secondary)
egen avg_daycare_30m_sum = rowtotal(avg_daycare_30m avg_daycare_30m_secondary)
egen avg_daycare_36m_sum = rowtotal(avg_daycare_36m avg_daycare_36m_secondary)

// generate final daycare measure!
egen cum_avg_daycare_36m_sum = rowmean(avg_daycare_18m_sum avg_daycare_24m_sum avg_daycare_30m_sum avg_daycare_36m_sum)


// other care
// average care in other place
gen avg_othercare_18m 	= hours_othercare_18m
egen avg_othercare_24m 	= rowmean(hours_othercare_24m)
egen avg_othercare_30m 	= rowmean(hours_othercare_30m)
egen avg_othercare_36m 	= rowmean(hours_othercare_36m)

// average care in other place (secondary)
gen avg_othercare_18m_secondary 	= hours_othercare_18m_secondary 
egen avg_othercare_24m_secondary 	= rowmean(hours_othercare_24m_secondary)
egen avg_othercare_30m_secondary 	= rowmean(hours_othercare_30m_secondary)
egen avg_othercare_36m_secondary 	= rowmean(hours_othercare_36m_secondary)

// average of averages care in other place 
egen avg_othercare_18m_sum = rowtotal(avg_othercare_18m avg_othercare_18m_secondary)
egen avg_othercare_24m_sum = rowtotal(avg_othercare_24m avg_othercare_24m_secondary)
egen avg_othercare_30m_sum = rowtotal(avg_othercare_30m avg_othercare_30m_secondary)
egen avg_othercare_36m_sum = rowtotal(avg_othercare_36m avg_othercare_36m_secondary)

// final measure of care in other places
egen cum_avg_othercare_36m_sum = rowmean(avg_othercare_18m_sum avg_othercare_24m_sum avg_othercare_30m_sum avg_othercare_36m_sum)
gen total_hours_us = cum_avg_othercare_36m_sum + cum_avg_daycare_36m_sum + mother_carehours
rename (cum_avg_othercare_36m_sum cum_avg_daycare_36m_sum std_avg_parenting) (other_hours_us daycare_hours_us parenting)

keep IHDP TWIN TG parenting parenting_residualized wiswall_sample daycare_hours_us daycare_hours_wiswall mother_carehours mother_laborhours total_hours_wiswall_1 other_hours_wiswall_1 other_hours_us total_hours_us total_hours_wiswall_2 other_hours_wiswall_2 total_hours_wiswall_3 other_hours_wiswall_3 total_hours_wiswall_4 other_hours_wiswall_4
order IHDP TWIN TG wiswall_sample parenting parenting_residualized daycare_hours_wiswall daycare_hours_us mother_carehours mother_laborhours other_hours_wiswall_1 other_hours_us total_hours_wiswall_1

// merge in working sample in the paper
merge 1:1 IHDP using "`masample'"
keep  if _merge == 3
drop _merge

foreach num of numlist 0 1 {
	summ  TWIN if TWIN == `num'
	local n`num' = string(r(N),"%9.0f")
}

// table calculations
// chaparro, wiswall et al 
reg daycare_hours_wiswall TG if wiswall_sample == 1, rob
matrix b = e(b)
local  nw = string(e(N),"%9.0f")

// difference
local diff_childcare_h_wiswall 		= b[1,1]
local diff_childcare_h_wiswall:di %6.2f `diff_childcare_h_wiswall'	
local control_childcare_h_wiswall 	= b[1,2]
local control_childcare_h_wiswall:di %6.2f `control_childcare_h_wiswall'	
local treat_childcare_h_wiswall 	= b[1,1] + b[1,2]
local treat_childcare_h_wiswall:di %6.2f `treat_childcare_h_wiswall'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_childcare_h_wiswall = 2*(1 - normal( abs(`t') ))
local p_childcare_h_wiswall:di %6.2f `p_childcare_h_wiswall'	
		
reg mother_carehours TG if wiswall_sample == 1, rob
matrix b = e(b)
// difference
local diff_mother_h_wiswall 		= b[1,1]
local diff_mother_h_wiswall:di %6.2f `diff_mother_h_wiswall'	
local control_mother_h_wiswall 	= b[1,2]
local control_mother_h_wiswall:di %6.2f `control_mother_h_wiswall'	
local treat_mother_h_wiswall 	= b[1,1] + b[1,2]
local treat_mother_h_wiswall:di %6.2f `treat_mother_h_wiswall'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_mother_h_wiswall = 2*(1 - normal( abs(`t') ))
local p_mother_h_wiswall:di %6.2f `p_mother_h_wiswall'	


reg other_hours_wiswall_1 TG if wiswall_sample == 1, rob
matrix b = e(b)
// difference
local diff_other_h_wiswall_1 		= b[1,1]
local diff_other_h_wiswall_1:di %6.2f `diff_other_h_wiswall_1'	
local control_other_h_wiswall_1 	= b[1,2]
local control_other_h_wiswall_1:di %6.2f `control_other_h_wiswall_1'	
local treat_other_h_wiswall_1 	= b[1,1] + b[1,2]
local treat_other_h_wiswall_1:di %6.2f `treat_other_h_wiswall_1'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_other_h_wiswall_1 = 2*(1 - normal( abs(`t') ))
local p_other_h_wiswall_1:di %6.2f `p_other_h_wiswall_1'	

reg other_hours_wiswall_2 TG if wiswall_sample == 1, rob
matrix b = e(b)
// difference
local diff_other_h_wiswall_2 		= b[1,1]
local diff_other_h_wiswall_2:di %6.2f `diff_other_h_wiswall_2'	
local control_other_h_wiswall_2 	= b[1,2]
local control_other_h_wiswall_2:di %6.2f `control_other_h_wiswall_2'	
local treat_other_h_wiswall_2 	= b[1,1] + b[1,2]
local treat_other_h_wiswall_2:di %6.2f `treat_other_h_wiswall_2'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_other_h_wiswall_2 = 2*(1 - normal( abs(`t') ))
local p_other_h_wiswall_2:di %6.2f `p_other_h_wiswall_2'

reg other_hours_wiswall_3 TG if wiswall_sample == 1, rob
matrix b = e(b)
// difference
local diff_other_h_wiswall_3 		= b[1,1]
local diff_other_h_wiswall_3:di %6.2f `diff_other_h_wiswall_3'	
local control_other_h_wiswall_3 	= b[1,2]
local control_other_h_wiswall_3:di %6.2f `control_other_h_wiswall_3'	
local treat_other_h_wiswall_3 	= b[1,1] + b[1,2]
local treat_other_h_wiswall_3:di %6.2f `treat_other_h_wiswall_3'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_other_h_wiswall_3 = 2*(1 - normal( abs(`t') ))
local p_other_h_wiswall_3:di %6.2f `p_other_h_wiswall_3'


reg other_hours_wiswall_4 TG if wiswall_sample == 1, rob
matrix b = e(b)
// difference
local diff_other_h_wiswall_4 		= b[1,1]
local diff_other_h_wiswall_4:di %6.2f `diff_other_h_wiswall_4'	
local control_other_h_wiswall_4 	= b[1,2]
local control_other_h_wiswall_4:di %6.2f `control_other_h_wiswall_4'	
local treat_other_h_wiswall_4 	= b[1,1] + b[1,2]
local treat_other_h_wiswall_4:di %6.2f `treat_other_h_wiswall_4'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_other_h_wiswall_4 = 2*(1 - normal( abs(`t') ))
local p_other_h_wiswall_4:di %6.2f `p_other_h_wiswall_4'
                    
// singletons, this paper									   
reg daycare_hours_us TG if TWIN == 0, rob
matrix b = e(b)
// difference
local diff_childcare_h_us 		= b[1,1]
local diff_childcare_h_us:di %6.2f `diff_childcare_h_us'	
local control_childcare_h_us 	= b[1,2]
local control_childcare_h_us:di %6.2f `control_childcare_h_us'	
local treat_childcare_h_us 	= b[1,1] + b[1,2]
local treat_childcare_h_us:di %6.2f `treat_childcare_h_us'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_childcare_h_us = 2*(1 - normal( abs(`t') ))
local p_childcare_h_us:di %6.2f `p_childcare_h_us'	


reg mother_carehours TG if TWIN == 0, rob
matrix b = e(b)
// difference
local diff_mother_h_us 		= b[1,1]
local diff_mother_h_us:di %6.2f `diff_mother_h_us'	
local control_mother_h_us 	= b[1,2]
local control_mother_h_us:di %6.2f `control_mother_h_us'	
local treat_mother_h_us 	= b[1,1] + b[1,2]
local treat_mother_h_us:di %6.2f `treat_mother_h_us'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_mother_h_us = 2*(1 - normal( abs(`t') ))
local p_mother_h_us:di %6.2f `p_mother_h_us'	

reg other_hours_us TG if TWIN == 0, rob
matrix b = e(b)
// difference
local diff_other_h_us 		= b[1,1]
local diff_other_h_us:di %6.2f `diff_other_h_us'	
local control_other_h_us 	= b[1,2]
local control_other_h_us:di %6.2f `control_other_h_us'	
local treat_other_h_us 	= b[1,1] + b[1,2]
local treat_other_h_us:di %6.2f `treat_other_h_us'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_other_h_us = 2*(1 - normal( abs(`t') ))
local p_other_h_us:di %6.2f `p_other_h_us'	

reg total_hours_us TG if TWIN == 0, rob
matrix b = e(b)
// difference
local diff_total_h_us 		= b[1,1]
local diff_total_h_us:di %6.2f `diff_total_h_us'	
local control_total_h_us 	= b[1,2]
local control_total_h_us:di %6.2f `control_total_h_us'	
local treat_total_h_us 	= b[1,1] + b[1,2]
local treat_total_h_us:di %6.2f `treat_total_h_us'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_total_h_us = 2*(1 - normal( abs(`t') ))
local p_total_h_us:di %6.2f `p_total_h_us'	


// twins, this paper
reg daycare_hours_us TG if TWIN == 1, rob
matrix b = e(b)
// difference
local diff_childcare_h_us_twin 		= b[1,1]
local diff_childcare_h_us_twin:di %6.2f `diff_childcare_h_us_twin'	
local control_childcare_h_us_twin 	= b[1,2]
local control_childcare_h_us_twin:di %6.2f `control_childcare_h_us_twin'	
local treat_childcare_h_us_twin 	= b[1,1] + b[1,2]
local treat_childcare_h_us_twin:di %6.2f `treat_childcare_h_us_twin'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_childcare_h_us_twin = 2*(1 - normal( abs(`t') ))
local p_childcare_h_us_twin:di %6.2f `p_childcare_h_us_twin'	

reg mother_carehours TG if TWIN == 1, rob

matrix b = e(b)
// difference
local diff_mother_h_us_twin 		= b[1,1]
local diff_mother_h_us_twin:di %6.2f `diff_mother_h_us_twin'	
local control_mother_h_us_twin 	= b[1,2]
local control_mother_h_us_twin:di %6.2f `control_mother_h_us_twin'	
local treat_mother_h_us_twin 	= b[1,1] + b[1,2]
local treat_mother_h_us_twin:di %6.2f `treat_mother_h_us_twin'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_mother_h_us_twin = 2*(1 - normal( abs(`t') ))
local p_mother_h_us_twin:di %6.2f `p_mother_h_us_twin'	

reg other_hours_us TG if TWIN == 1, rob
matrix b = e(b)
// difference
local diff_other_h_us_twin 		= b[1,1]
local diff_other_h_us_twin:di %6.2f `diff_other_h_us_twin'	
local control_other_h_us_twin 	= b[1,2]
local control_other_h_us_twin:di %6.2f `control_other_h_us_twin'	
local treat_other_h_us_twin 	= b[1,1] + b[1,2]
local treat_other_h_us_twin:di %6.2f `treat_other_h_us_twin'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_other_h_us_twin = 2*(1 - normal( abs(`t') ))
local p_other_h_us_twin:di %6.2f `p_other_h_us_twin'	

reg total_hours_us TG if TWIN == 1, rob
matrix b = e(b)
// difference
local diff_total_h_us_twin 		= b[1,1]
local diff_total_h_us_twin:di %6.2f `diff_total_h_us_twin'	
local control_total_h_us_twin 	= b[1,2]
local control_total_h_us_twin:di %6.2f `control_total_h_us_twin'	
local treat_total_h_us_twin 	= b[1,1] + b[1,2]
local treat_total_h_us_twin:di %6.2f `treat_total_h_us_twin'	

// p-value: pooled difference
local t = _b[TG]/_se[TG]
local p_total_h_us_twin = 2*(1 - normal( abs(`t') ))
local p_total_h_us_twin:di %6.2f `p_total_h_us_twin'	

// table
cd $output
texdoc init replication_table.tex, replace force

tex \begin{tabular}[t]{lcc ccc}
tex		\noalign{\hrule height 1.5pt} 
tex    									& (1) & (2)	& (3)				& (4)  \\ 
tex \hline
tex    										& Treatment				& Control & Difference 	& $ p $-value				 \\ 
tex \hline
tex	\rule{0pt}{3ex}\textbf{\textit{Panel a.} Chaparro et al. (Working Paper)}	&&&& \\ 
tex	\hspace{2mm} Hours per week of program care				& 18.18	& 0.00	& 18.18	& 0.00		\\ 
tex	\hspace{2mm} Hours per week of maternal care				& 52.40	& 62.07	& -9.67	& 0.00			\\  
tex \hspace{2mm} Hours per week other caretakers (data)		& N/A	& N/A	& N/A	& N/A			\\ 
tex	\hspace{2mm} Hours per week other caretakers (residual)	& & & & 		\\  
tex	\hspace{4mm} if Total Hours = 87.5						& 16.92	& 25.43	& -8.52	& 0.00			\\  
tex	\hspace{4mm} if Total Hours = 84							& 13.42	& 21.93	& -8.52	& 0.00 			\\  
tex	\hspace{4mm} if Total Hours = 80.5						& 9.92	& 18.43	& -8.52	& 0.00			\\  
tex	\hspace{4mm} if Total Hours = 77							& 6.42	& 14.93	& -8.52	& 0.00 			\\  
tex \hdashline 
tex \hspace{2mm} Number of Observations & \multicolumn{4}{c}{N/A} \\
tex \hline

tex	\rule{0pt}{3ex}\textbf{\textit{Panel b.} Chaparro et al. (Replication)}	&&&& \\ 
tex	\hspace{2mm} Hours per week of program care				& `treat_childcare_h_wiswall'	& `control_childcare_h_wiswall'	& `diff_childcare_h_wiswall'	& `p_childcare_h_wiswall'		\\ 
tex	\hspace{2mm} Hours per week of maternal care				& `treat_mother_h_wiswall'		& `control_mother_h_wiswall'	& `diff_mother_h_wiswall'		& `p_mother_h_wiswall'				\\  
tex \hspace{2mm} Hours per week other caretakers (data)		& N/A	& N/A	& N/A	& N/A	& 		\\ 
tex	\hspace{2mm} Hours per week other caretakers (residual)	& & & & 		\\   
tex	\hspace{4mm} if Total Hours = 87.5						& `treat_other_h_wiswall_1'	& `control_other_h_wiswall_1'	& `diff_other_h_wiswall_1'	& `p_other_h_wiswall_1' 		\\  
tex	\hspace{4mm} if Total Hours = 84							& `treat_other_h_wiswall_2'	& `control_other_h_wiswall_2'	& `diff_other_h_wiswall_2'	& `p_other_h_wiswall_2' 			\\  
tex	\hspace{4mm} if Total Hours = 80.5						& `treat_other_h_wiswall_3'	& `control_other_h_wiswall_3'	& `diff_other_h_wiswall_3'	& `p_other_h_wiswall_3' 			\\  
tex	\hspace{4mm} if Total Hours = 77							& `treat_other_h_wiswall_4'	& `control_other_h_wiswall_4'	& `diff_other_h_wiswall_4'	& `p_other_h_wiswall_4' 			\\   
tex \hdashline 
tex \hspace{2mm} Number of Observations & \multicolumn{4}{c}{`nw'} \\
tex \hline

tex	\rule{0pt}{3ex}\textbf{\textit{Panel c.} This paper (Singletons)}	&&&& \\ 
tex	\hspace{2mm} Hours per week of center-based care			& `treat_childcare_h_us'		& `control_childcare_h_us'	& `diff_childcare_h_us'	& `p_childcare_h_us' 			\\ 
tex	\hspace{2mm} Hours per week of maternal care				& `treat_mother_h_us'			& `control_mother_h_us'		& `diff_mother_h_us'	& `p_mother_h_us'				\\  
tex \hspace{2mm} Hours per week other caretakers (data)		& `treat_other_h_us'			& `control_other_h_us'		& `diff_other_h_us'		& `p_other_h_us'		\\ 
tex	\hspace{2mm} Implied Total Hours							& `treat_total_h_us'			& `control_total_h_us'		& `diff_total_h_us'		& `p_total_h_us'		\\  
tex \hdashline 	
tex \hspace{2mm} Number of Observations & \multicolumn{4}{c}{`n0'} \\
tex \hline

tex	\rule{0pt}{3ex}\textbf{\textit{Panel d.} This paper (Twins)}	&&&& \\ 
tex	\hspace{2mm} Hours per week of center-based care			& `treat_childcare_h_us_twin'		& `control_childcare_h_us_twin'	& `diff_childcare_h_us_twin'	& `p_childcare_h_us_twin'			\\ 
tex	\hspace{2mm} Hours per week of maternal care				& `treat_mother_h_us_twin'			& `control_mother_h_us_twin'	& `diff_mother_h_us_twin'		& `p_mother_h_us_twin'		 		\\  
tex \hspace{2mm} Hours per week other caretakers (data)		& `treat_other_h_us_twin'			& `control_other_h_us_twin'		& `diff_other_h_us_twin'		& `p_other_h_us_twin'			\\ 
tex	\hspace{2mm} Implied Total Hours							& `treat_total_h_us_twin'			& `control_total_h_us_twin'		& `diff_total_h_us_twin'		& `p_total_h_us_twin'			\\  
tex \hdashline 
tex \hspace{2mm} Number of Observations & \multicolumn{4}{c}{`n1'} \\

tex	\noalign{\hrule height 1.5pt} 
tex \end{tabular}
